#include "dijkstra.h"

#include <stdio.h>

class GraphArray : public IGraph
{
private:
	int dis[10][10];
public:
	GraphArray()
	{
		for(int i = 0; i < 10; i++)
		{
			for(int j = 0; j < 10; j++)
			{
				dis[i][j] = INF_DISTANCE;
				if(i == j) dis[i][j] = 0;
			}
		}
		dis[0][1] = 10;
		dis[1][0] = 20;
	}

	virtual int GetVertexCount()
	{
		return 10;
	}

	virtual int GetDistance(int vertexA, int vertexB)
	{
		return dis[vertexA][vertexB];
	}


};

int main()
{
	int d[10], p[10];
	IGraph *graph = new GraphArray();
	Dijkstra(graph, 0, d, p);
	for(int i = 0; i < 10; i++)
	{
		printf("d = %d, p = %d\n", p[i], d[i]);
	}
}
